/*
    This file is a part of t18 project (C++17 framework for algotrading)
    Copyright (C) 2019, Arech (aradvert@gmail.com; https://github.com/Arech)

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.
*/
#pragma once

namespace t18 {
	namespace feeder {

		template<typename MktT, typename TServT>
		struct tickerUpdater {
			MktT& m;
			TServT& t;

			tickerUpdater(MktT& _m, TServT& _t) : m(_m), t(_t) {}

			void notifyDateTime(mxTimestamp ts) {
				m.notifyDateTime(t, ts);
			}
			void newBarOpen(const tsq_data& tso) {
				m.newBarOpen(t, tso);
			}
			void newBarAggregate(typename TServT::bar_t const& bar) {
				m.newBarAggregate(t, bar);
			}
		};

	}
}

